(function($){
	var __validate = $.fn.validate;
	$.fn.registValidate = function(opts) {
		var __rules = $.extend({
			inputName:"required",
			inputEmail:"required",
			inputPassword:"required",
			confirmPassword:{
				equalTo:"#inputPassword"
			},
		},opts?(opts.rules||{}):{});
		var __messages = $.extend({
			inputName:"用户名不能为空",
			inputEmail:"用户邮箱不能为空",
			inputPassword:"用户密码不能为空",
			confirmPassword:"两次输入的密码不相同",
		},opts?(opts.messages||{}):{});
		var __defaultOpts = $.extend(opts||{},{
			rules:__rules,
			messages:__messages,
			errorElement: opts?(opts.errorElement||"span"):"span",
			errorClass:opts?(opts.errorClass||"errorContainer"):"errorContainer"
		});
		$.extend($.fn.validate.prototype,__defaultOpts);
		__validate.call(this,__defaultOpts);
		return this;
	}
})(jQuery)